import request from '@/config/axios'

/**
 * 保存
 * @param params
 */
export const save = async (params: PageParam) => {
  return await request.post({ url: '/house/save', data: params })
}
export const saveBatch = async (params: PageParam) => {
  return await request.post({ url: '/house/save/batch', data: params })
}

// 查询视频库列表
export const page = async (params: PageParam) => {
  return await request.get({ url: '/house/page', params })
}

//查询外壳详情
export const one = async (id: number) => {
  return await request.get({ url: '/house/' + id + '/one' })
}

export const selectByType = async (id, name) => {
  return await request.get({ url: '/house/list/' + id + '?name=' + name })
}

export const selectInfo = async (houseId, metaId) => {
  return await request.get({ url: '/house/info/' + metaId + '/' + houseId })
}
export const selectMetaInfo = async (houseId, metaId, id) => {
  return await request.get({ url: '/house/meta/info/' + metaId + '/' + houseId + '/' + id })
}
export const  updateRatio = async (id,params) => {
  return await request.post({url: 'house/meta/updateRatio/' +id, data: params})
}
// 删除
export const deleted = async (ids) => {
  return await request.delete({ url: '/house/delete', data: ids })
}
